package ${packageCode}.api.vx.${moduleMapperCode}.${(businessCode?uncap_first)!''}

import org.apache.shiro.SecurityUtils

class index implements java.io.Serializable {
    def input(input) {
        input
    }

    def validation(input) {

    }

    def func(input) {
        input
    }

    def output(output) {
        output.permission_add = SecurityUtils.getSubject().hasRole('administrator') || SecurityUtils.getSubject().isPermitted('${moduleMapperCode}:${(businessCode?uncap_first)!''}:add')
        output.permission_modify = SecurityUtils.getSubject().hasRole('administrator') || SecurityUtils.getSubject().isPermitted('${moduleMapperCode}:${(businessCode?uncap_first)!''}:modify')
        output.permission_delete = SecurityUtils.getSubject().hasRole('administrator') || SecurityUtils.getSubject().isPermitted('${moduleMapperCode}:${(businessCode?uncap_first)!''}:delete')
        output.permission_import = SecurityUtils.getSubject().hasRole('administrator') || SecurityUtils.getSubject().isPermitted('${moduleMapperCode}:${(businessCode?uncap_first)!''}:import')
        output.permission_export = SecurityUtils.getSubject().hasRole('administrator') || SecurityUtils.getSubject().isPermitted('${moduleMapperCode}:${(businessCode?uncap_first)!''}:export')

        output
    }
}